<?php
#[Table('language')]
#[PrimaryKey('id')]
class Areas_Language_Models_Language extends XPHP_Model
{
	public $id;
	
	public $code;
	
	public $name;
	
	public $flag;
	
	public $default;
	
	public function getIdLanguage($code)
	{
		$lang = $this->db->where('code', $code)->get()->result();
		return $lang[0]->id;
	}
}